<?php
class Mwc_SystemPoint_Block_Userpoint_Render_Fields extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
  public function render(Varien_Data_Form_Element_Abstract $element) {
    //You can write html for your button here
    $html = '
    <table cellspacing="0" class="form-list">
    	<tbody>
     		<tr>
	        	<td class="label">
	        		<label for="userkind">What kind of user? <span class="required">*</span></label>
	        	</td>
			    <td class="value">
			        <INPUT TYPE="radio" NAME="usertype" VALUE="1" CHECKED onClick="changeDiv(this.value)">Existing users
					<INPUT TYPE="radio" NAME="usertype" VALUE="0" onClick="changeDiv(this.value)">New users
				</td>
		    </tr>
		 </tbody>
	</table>
    <div id="1">
    <table cellspacing="0" class="form-list">
    	<tbody>
			<tr>
			    <td class="label">
			    	<label for="emailformat">Email format</label>
			    </td>
			    <td class="value">
			        <input type="text" class=" input-text" title="Email format" value="" name="emailformat" id="emailformat">
					<small>Extension for email. Exp:<i>@example.ext</i></small>            
				</td>
			</tr>
			<tr>
			    <td class="label">
			    	<label for="email">Other emails</label>
			    </td>
			    <td class="value">
			        <textarea class=" textarea" cols="15" rows="2" tabindex="1" onchange="" onclick="" title="Other emails" name="otheremail" id="otheremail"></textarea>
			        <small>Please separate by comma (,) for multi email.</small>               
		        </td>
		    </tr>
		</tbody>
	</table>
	</div>
	<div id="0" style="display:none">
	<table cellspacing="0" class="form-list">
		<tbody>
			<tr>
				<td class="label">
					<label for="newemail">Emails</label>
				</td>
			    <td class="value">
			        <textarea class=" textarea" cols="15" rows="2" tabindex="1" onchange="" onclick="" title="Emails" name="newemail" id="newemail"></textarea>
			        <small>Please separate by comma (,) for multi email.</small>   
			    </td>
		    </tr>
		</tbody>
     </table>';
   $html .= "<script language='JavaScript'>
		function changeDiv(val) { 
			document.getElementById(0).style.display = 'none'; 			
			document.getElementById(1).style.display = 'none'; 		
			document.getElementById(val).style.display = 'block'; 
		} 
   </script>";
   return $html;
  }
}